Fix arrow functions inside ternary expressions#408
Fix arrow functions inside ternary expressions#408winstliu merged 6 commits intoatom:masterfrom MaximSokolov:fix-arrow-functions-inside-teranry-exp
Conversation
|
Uhm, what was wrong with my fix, exactly? |
|
There's no need to restrict #279's fix to |
|
This is a necessary step to recognize object keys. See #307 // for e.g.
switch() {
default:
}
a = {
default: 123
} |
|
Sigh... I see this was already discussed. In which case, I'll probably have to rebase against your branch, since I'm in the middle of fixing numerous bugs for another PR... |
|
@50Wliu Any chance of getting this merged soon? There'll be a new version of Linguist this week, and it'd be nice to have these highlighting bugs fixed on the site. Otherwise, they'll linger on GitHub for a few weeks longer. :p Just to be clear: once this and the other PR get merged, I'll go balls out on remaining bug fixes in the hopes of getting everything under the one release. =) /cc @pchaigno Paging you because @arfon won't hear me from where I'm standing. Literally (his name's not showing up in my mentions menu...). |
I am currently much busier than I was just a week ago, so expect my activity on GitHub to tank significantly for a while. I'll try to merge this to unblock your other PRs but those might sit for some time before proper review. |
| '0': | ||
| 'name': 'keyword.operator.ternary.js' | ||
| 'patterns': [ | ||
| { |
There was a problem hiding this comment.
Can you explain what this match does in more detail?
In addition, why is the second $self needed?
There was a problem hiding this comment.
See 157241d. There is no need to include $self here. Though most of the rules must be moved to the repo and it also requires addition testing, so I kept it as is for now. The second $self includes everything else between ? and :
|
7296d5d yesssss Glad to see you're working on this again @MaximSokolov! |
Fixes #406 by using begin/end matching for ternary expressions
Fixes #279 by matching case statements only in switch block (replaces #405 fix)